#ifndef __WORKER_H__
#define __WORKER_H__

#include <iostream>
#include "StringKey.h"

#pragma once
class Worker
{
	StringKey* m_name;	//worker name
	unsigned int m_years; //number of years in the company
	unsigned int m_rank;	//rank

public:

	StringKey* GetKey() {return GetName();}
	Worker* Read(ifstream &file);
	Worker* Read();
	void Print();

	//Geters
	StringKey* GetName() {return m_name;}
	unsigned int GetYears() {return m_years;}
	unsigned int GetRank() {return m_rank;}
	//ifstream* GetFile() const {return m_inFile;}

	//Seters
	void SetName(StringKey* name) {m_name = name;}
	void SetYears(const unsigned int years) {m_years = years;}
	void SetRank(const unsigned int rank) {m_rank = rank;}
	//void SetFile(ifstream& file) {m_inFile = &file;}

	//C'tors and D'tors
	Worker(void): m_name(NULL), m_years(0), m_rank(0) {}
	Worker(StringKey* key): m_name(key), m_years(0), m_rank(0) {}  
	virtual ~Worker(void);
};


#endif